This invention relates to a spindle speed control method and apparatus and more particularly to such a method and apparatus in which the speed ranges for respective gear ranges are selected in advance so that the speed ranges corresponding to neighboring gear ranges partially overlap one another, and in which the gear ranges conforming to a newly commanded spindle speed are selected for rotating the spindle with gears of the thus selected gear range.
In NC machine tools, the spindle speed is commanded by an S-function instruction from a numerical control device. The spindle speed is required to have a wide speed range. Gear means are used in a known manner so that this wide speed range is covered by a single electric motor. The desired gears are selected in advance by an M-function instruction in accordance with the commanded spindle speed so that the spindle is rotated at the commanded spindle speed.
In FIG. 1, the relation between the spindle speed ranges and the gear ranges is shown. The first range covers the speed range between 500 and 1500 rpm, the second range covers the speed range between 1000 and 3000 rpm, and the third range covers the speed range between 2000 and 5000 rpm. The speed range of neighboring ranges partially overlap one another.
When the speed ranges of neighboring gear ranges partially overlap one another in this manner, care must be taken or the number of times the range is switched will increase unnecessarily, thus affecting the machining time and thereby efficiency. This is because the machine tool operates to change the spindle speed upon receiving the S-function instruction (spindle speed instruction) from the NC device and sends an S-function completion signal to the NC device, whereby the NC device proceeds to the next NC command. Thus, an increase in the number of times the range is switched may prolong the time for switching the spindle speed and, hence, prolong the machining time. It is therefore necessary to minimize the number of times range switching is performed. However, the conventional system involves switching range a large number of times. For example, when the spindle is rotating at 1800 rpm, which is included in the second range, and a commanded spindle speed is 1300 rpm, included in the overlapping range of the first and second ranges, a gear change is made. The reason for this is that the gear range to which the commanded spindle speed belongs is decided by starting the selection from the lower range. Thus, whether the commanded spindle speed belongs to the first, second or third range is decided in this order and is based on a negative decision regarding the respective preceding ranges. Thus, when the spindle is rotating at 3100 rpm which is included in the third range, and the commanded spindle speed is 2950 rpm which is included in the range overlapping the second and third ranges, the gear range is switched from the third range to the second range. In actuality, however, gear changes are not required for speed changes from 1800 rpm to 1300 rpm or from 3100 rpm to 2950 rpm.